import dayjs from 'dayjs';

export const timeFilter = (value: any, fmt: any = 'YYYY-MM-DD HH:mm:ss') => {
  let str: any = '';

  if (typeof value === 'number') {
    str = dayjs(value).format(fmt);
  } else {
    str = dayjs(new Date(value)).format(fmt);
  }
  return str;
};
